﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Twi.COMMON.HTTP
{
    public class Config
    {
        private static string Address;
        public static string APIKey()
        {
            string key = ConfigurationManager.AppSettings["APIKey"];
            return key;
        }

        public static string ServerAddress()
        {
            if (Address == null)
            {
                return "http://" + ConfigSettings.GetSettingValue("ServerUrl") + "/";
            }
            return Address;
        }

        public static void SetAddress(string serverAddress)
        {
            Address = serverAddress;
        }
    }
}
